<!--
  Generated template for the MyProductListPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
    <ion-navbar>
      <ion-title>我的商品</ion-title>
      <ion-buttons end>
          <button ion-button color="primary" icon-only (click)="addBtnCliked()">
            <ion-icon name="ios-add-circle-outline"></ion-icon>
          </button>
        </ion-buttons>
    </ion-navbar>
    <div style="width:100%;overflow:auto" class="msearchbar">
      <ion-searchbar [(ngModel)]="searchContent" cancelButtonText="取消" placeholder="请输入商品名称或编号" col-10 float-left (keydown)="keydown($event)">
      </ion-searchbar>
      <button no-padding no-margin ion-button clear col-2 float-right (click)="rightBtnClicked()">筛选</button>
    </div>
  </ion-header>
  
  <ion-content no-padding>
    <ion-refresher (ionRefresh)="doRefresh($event)">
      <ion-refresher-content
        pullingText="下拉刷新"></ion-refresher-content>
    </ion-refresher>
    <ion-list no-lines>
      <jl-product-item (itemEvent)="itemEvent(item)" *ngFor="let item of dataArray " [item]=item ></jl-product-item>
      <ion-allitem-showed-bottom *ngIf="dataArray.length>=total&&dataArray.length>0"></ion-allitem-showed-bottom>
      <ion-custom-empty *ngIf="total==0"></ion-custom-empty>
    </ion-list>
    <ion-infinite-scroll *ngIf="dataArray.length<total" (ionInfinite)="doInfinite($event)">
      <ion-infinite-scroll-content loadingText="正在加载..."></ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </ion-content>